<% provide(:head_title, t("users.settings.account.preferences.head_title")) %>

<div id="user_preferences" class="contents">
  <user-preferences
    :update-url = "'<%= update_preferences_path(format: :json) %>'"
    :user-settings = "<%= @user.settings.to_json %>"
    :time-zones = "<%= ActiveSupport::TimeZone.all.map{ |tz|
                                [ tz.name, tz.formatted_offset + " " + tz.name]
                              }.to_json %>"
    :date-formats = "<%= Constants::SUPPORTED_DATE_FORMATS.map { |df|
                                [df, "#{l(Time.new(2024, 4, 22), format: :full_date, date_format: df)}"]
                              }.to_json %>"
    :notifications-groups = "<%= NotificationExtends::NOTIFICATIONS_GROUPS.to_json %>"
  />
</div>

<%= javascript_include_tag "vue_user_preferences" %>
